import request from "@/util/request"
const api_url = '/api/hosp/hospital'

export default {
  // 分页获取医院信息
  findHospPageList(page, limit, searchObj) {
    return request({
      url: `${api_url}/${page}/${limit}`,
      method: 'get',
      params: searchObj //json传递用data
    })
  },
  // 根据医院名称模糊查询医院列表
  findHospitalByHosnameLike(hosname) {
    return request({
      url: `${api_url}/findByHosname/${hosname}`,
      method: 'get'
    })
  },
  // 查询医院详情
  getHospitalByHoscode(hoscode){
    return request({
      url: `${api_url}/${hoscode}`,
      method: 'get'
    })
  },
  // 获取科室列表
  getDepartmentList(hoscode){
    return request({
      url: `${api_url}/department/${hoscode}`,
      method: 'get'
    })
  },
  //获取可预约排班数据
  getBookingScheduleRule(page, limit, hoscode, depcode) {
    return request({
      url: `${api_url}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
      method: 'get'
    })
  },
  // 获取某天的排班数据
  findScheduleList(hoscode, depcode, workDate) {
    return request({
      url: `${api_url}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
      method: 'get'
    })
  },
  // 获取排班详情
  getSchedule(scheduleId) {
    return request({
      url: `${api_url}/getSchedule/${scheduleId}`,
      method: 'get'
    })
  }
}
